<!--{include(pe_tpl('header.html'));}-->
<div class="right_page">
	<div class="now">
		<a href="javascript:;" class="sel">{$menutitle}<i></i></a>
		<div class="clear"></div>
	</div>
	<form method="post" id="form">
	<div class="right_main">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="wenzhang mat20 mab20">
		<tr>
			<td align="right" width="200">权限名称：</td>
			<td><input type="text" name="info[adminlevel_name]" value="{$info['adminlevel_name']}" class="inputall input200" /></td>
		</tr>
		<tr>
			<td align="right" valign="top">权限分配：</td>
			<td>
				<!--{foreach($adminmenu as $k=>$v):}-->
				<div class="fl" style="width:150px">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="wenzhang" style="margin:0">
				<tr>
					<th class="bgtt left" style="padding-left:20px">{$v['headnav']}</th>
				</tr>
				<tr>
					<td>
						<!--{foreach($v['subnav'] as $kk=>$vv):}-->
						<div class="tc_div" style="position:relative">
							<label style="display:inline-block"><input type="checkbox" name="modact[]" value="{$vv['modact'][0]}" class="inputfix js_p" <!--{if(in_array($vv['modact'][0], $info['adminlevel_modact'])):}-->checked="checked"<!--{endif;}--> /> {$vv['name']}</label>
							<!--{if(is_array($vv['list'])):}-->
							<div class="tc_add">
								<div class="sj_ico"></div>
								<!--{foreach($vv['list'] as $kkk=>$vvv):}-->
								<label style="display:inline-block"><input type="checkbox" name="modact[]" value="{$vvv['modact'][0]}" class="inputfix js_c" <!--{if(in_array($vvv['modact'][0], $info['adminlevel_modact'])):}-->checked="checked"<!--{endif;}--> /> {$vvv['name']}</label>
								<!--{endforeach;}-->
							</div>
							<!--{endif;}-->
						</div>
						<!--{endforeach;}-->
					</td>
				</tr>
				</table>
				</div>
				<!--{endforeach;}-->
				<div class="clear"></div>
			</td>
		</tr>
		</table>
	</div>
	<div class="right_bottom center">
		<input type="hidden" name="pesubmit" />
		<input type="hidden" name="pe_token" value="{$pe_token}" />
		<input type="button" value="提 交" class="tjbtn" />
	</div>
	</form>
</div>

<script type="text/javascript">
$(function(){
	$(".tc_div").hover(function(){
		$(this).find(".tc_add").show();
	}, function(){
		$(this).find(".tc_add").hide();	
	})
	$(".js_p").click(function(){
		var _this = $(this).parents(".tc_div");
		if ($(this).attr("checked") == 'checked') {
			_this.find(".js_c").attr("checked", "checked");		
		}
		else {
			_this.find(".js_c").removeAttr("checked");		
		}
	})
	$(".js_c").click(function(){
		var _this = $(this).parents(".tc_div");
		if (_this.find(".js_c:checked").length > 0) {
			_this.find(".js_p").attr("checked", "checked");		
		}
		else {
			_this.find(".js_p").removeAttr("checked");		
		}
	})
	$(":button").click(function(){
		pe_submit("{pe_nowurl()}", function(json){
			if (json.code == 1) pe_open('back', 1000);
		})
	})
})
</script>
<!--{include(pe_tpl('footer.html'));}-->